package com.xdf.whiteaccount.service;
import com.xdf.whiteaccount.utils.Example;
import com.xdf.whiteaccount.entity.DyeGreyDetail;
import java.util.List;
import java.util.Optional;

/**
 * @Description : 服务层接口，由代码生成器自动生成
 * @Author : chanchaw
 * @Date : 2023-12-15 16:08:04
 */
public interface DyeGreyDetailService {
    DyeGreyDetail insert(DyeGreyDetail record);

    DyeGreyDetail insertSelective(DyeGreyDetail record);

    List<DyeGreyDetail> multiInsert(List<DyeGreyDetail> list);

    int updateByPrimaryKey(DyeGreyDetail record);

    int updateByPrimaryKeySelective(DyeGreyDetail record);

    // 根据主键删除
    int deleteByPrimaryKey(Integer id);
    // 根据主键查询
    DyeGreyDetail selectByPrimaryKey(Integer id);
    // 根据主键作废
    int setVoid(Integer id);
    // 是明细表则有字段 parent_id
    List<DyeGreyDetail> selectByParentId(Integer parentId);

    List<DyeGreyDetail> selectAll();

    DyeGreyDetail save(DyeGreyDetail record);
    List<DyeGreyDetail> multiSave(List<DyeGreyDetail> list);

    //================= 下面是默认方法 ==================
    default void checkEntityNotNull(DyeGreyDetail record){// 返回true表示合法，可继续
        if(record == null) throw new RuntimeException("无法保存空数据！");
    }

    default DyeGreyDetail fullFill(DyeGreyDetail record){
        return record;
    }

    default void doBeforeInsert(DyeGreyDetail record){}
    default void doAfterInsert(DyeGreyDetail record){}
    List<DyeGreyDetail> selectByExample(Example<DyeGreyDetail> example);
    DyeGreyDetail moveBill(Integer id, String moveBillFlag);
    //=================以上是自动生成的代码，自定义代码请写在下面==================
    List<DyeGreyDetail> get8JrkbillsumPK(List<Integer> jrkbillsumIdList);
}